<template>
  <div class="source">
    <div v-for="item in sourceRouter" :key="item.id" @click="goRouter(item)">
      <h-card :card-item="item"></h-card>
    </div>
  </div>
</template>

<script setup lang="ts">
import HCard from "@/componentMobile/HCard.vue";
import { useRouter } from "vue-router";
type TSourceConfig = {
  id: number;
  name: string;
  router: string;
};
const sourceRouter: TSourceConfig[] = [
  { id: 1, name: "视频", router: "/video-h5" },
  { id: 2, name: "导航", router: "/nav-h5" },
  { id: 3, name: "pdf", router: "/pdf-h5" },
];

const router = useRouter();
const goRouter = (item: TSourceConfig) => {
  router.push(item.router);
};
</script>

<style></style>
